<? $page_title='库存明细' ?>
<?include "FASHION/page_header.phtml"?>
<script language="JavaScript" src="<{$root}>/util/datepicker/WdatePicker.js"></script>

<form method="post">
	时间自：
	<input type="text" class="wdate" id="from" name="from" size="10" value="<?= fetch_a_string('from')?>"
		   onfocus="WdatePicker({onpicked:function(){$dp.$('to').focus();},maxDate:'#F{$dp.$D(\'to\')}'})" readonly />
	至 <input type="text" class="wdate" id="to" name="to" size="10" value="<?= fetch_a_string('to')?>"
		   onfocus="WdatePicker({minDate:'#F{$dp.$D(\'from\')}'})" readonly />
	&nbsp; <input type="submit" value="汇总" />
</form>

<table border=0 class="list" width="100%" id="stuff_list"><tbody>
	<tr class="nobg">
		<th rowspan="2">日期</th>
		<th rowspan="2">编号</th>
		<th rowspan="2">材料名称</th>
		<th rowspan="2">品牌</th>
		<th rowspan="2">规格</th>
		<th rowspan="2">单位</th>
		<th colspan="3">入库</th>
		<th colspan="3">出库</th>
		<th colspan="3">结存</th>
		<th rowspan="2" width="100">备注</th>
	</tr>
	<tr>
		<th>数量</th>
		<th>单价</th>
		<th>金额</th>
		<th>数量</th>
		<th>单价</th>
		<th>金额</th>
		<th>数量</th>
		<th>单价</th>
		<th>金额</th>
	</tr>
<{if $list}>
<{foreach item=ware from=$list}>
	<tr id="selstf_<{$ware.id}>">
		<td><{= date('Y-m-d H:i',$ware.addtime) }>&nbsp;</td>
		<td><{$ware.sno}>&nbsp;</td>
		<td><{$ware.name}>&nbsp;</td>
		<td><{$ware.brand}></td>
		<td><{$ware.specific}></td>
		<td><{$ware.unit}></td>
	<{if $ware.class=='in'}>
		<td class="decimal"><{$ware.amount}></td>
		<td class="fnum"><{$ware.price}></td>
		<td class="fnum"><{= $ware.price * $ware.amount}></td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	<{else}>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td class="decimal"><{$ware.amount}></td>
		<td class="fnum"><{$ware.price}></td>
		<td class="fnum"><{= $ware.price * $ware.amount}></td>
	<{/if}>
		<td class="decimal"><{$ware.bl_amount}></td>
		<td class="fnum"><{$ware.bl_price}></td>
		<td class="fnum"><{$ware.bl_total}></td>
		<td class="text"><{$ware.remark}></td>
	</tr>
<{/foreach}>
<{/if}>
</tbody></table>

<? Html::pager($pager); ?>

<?include "FASHION/page_footer.phtml"?>
